Companion

object Companion

Functions

Link copied to clipboard
fun convertValue(value: Long, fromCurrency: CurrencyType, toCurrency: CurrencyType): Long

Return the amount of toCurrency that the given value of fromCurrency is currently worth.

fun convertValue(value: Long, fromCurrency: CurrencyType, toCurrency: CurrencyType, userRate: Double): Long

Return the amount of 'toCurrency' obtained by exchanging 'value' of 'fromCurrency' at the rate 'rate'

fun convertValue(value: Long, fromCurrency: CurrencyType?, toCurrency: CurrencyType?, effectiveDate: Int): Long

Return the amount of toCurrency that the given value of fromCurrency was worth on the given date.

Link copied to clipboard
fun getRawRate(fromCurrency: CurrencyType, toCurrency: CurrencyType, userRate: Double): Double

Convert the given user-identifiable rate to the 'raw' rate used to exchange amounts between the given two currencies.

Link copied to clipboard
fun getUserRate(fromCurrency: CurrencyType, toCurrency: CurrencyType): Double

Get the current user-identifiable rate from fromCurrency to toCurrency.

fun getUserRate(fromCurrency: CurrencyType, toCurrency: CurrencyType, rawRate: Double): Double

Convert the given raw rate to the user-identifiable rate used to exchange amounts between the given two currencies.